//
//  DemandContentHeadCell.m
//  BusinessMarket
//
//  Created by Michael Li on 2018/10/29.
//  Copyright © 2018年 Michael Li. All rights reserved.
//

#import "DemandContentHeadCell.h"
#import "SpecialRecommendationModel.h"
@interface DemandContentHeadCell()
@property (weak, nonatomic) IBOutlet UILabel *titleL;
@property (weak, nonatomic) IBOutlet UILabel *pageViewCountL;
@property (weak, nonatomic) IBOutlet UILabel *creatTimeL;
@property (weak, nonatomic) IBOutlet UILabel *contentL;

@end
@implementation DemandContentHeadCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)setSpecialModel:(SpecialRecommendationModel *)specialModel
{
    _specialModel = specialModel;
    self.titleL.text = specialModel.title;
    self.pageViewCountL.text = [NSString stringWithFormat:@"%ld",specialModel.readcount];
    NSTimeInterval interval    = specialModel.createtime/1000.0;
    NSDate *date               = [NSDate dateWithTimeIntervalSince1970:interval];
    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
    [formatter setDateFormat:@"yyyy-MM-dd"];
    NSString *currentDateStr = [formatter stringFromDate: date];
    self.creatTimeL.text = currentDateStr;
    self.contentL.text = specialModel.represent;
}

@end
